#!/bin/bash
#2019-09-05 Script renders an R or Rmd file
if [ "$1" ]; then
	V0=".pdf"
	V1="$1$V0"
	CMD="rmarkdown::render(\"${1}\", output_format = \"pdf_document\", output_file = \"${V1}\")"
	rm -f .temp.R
	echo $CMD >> .temp.R
	Rscript  .temp.R
	rm -f .temp.R
#	exec okular "$V1"
else
	echo "No Arguments Supplied"
fi
